//定义PrimaryStudent，从Student继承，并新增一个grade字段：

public class Main {
    public static void main(String[] args) {
        Person p = new Person("小明", 12);
        Student s = new Student("小红", 20, 99);
        // TODO: 定义PrimaryStudent，从Student继承，新增grade字段:
        Student ps = new PrimaryStudent("小军", 9, 100, 5);
        PrimaryStudent pps = new PrimaryStudent("小军", 9, 100, 5);
        System.out.println(ps.getScore());
        System.out.println(pps.getGrade());

    }
}

class Person {
    protected String name;
    protected int age;

    public Person(String name ,int age){
        this.name = name;
        this.age = age;
    }
    public String getname(){
        return name;
    }
    public void setname(String name){
        this.name = name;
    }
    public int getage(){
        return age;
    }
    public void setage(int age){
        this.age = age;
    }
}

class Student extends Person {
    protected int socre;
    public Student( String name,int age,int socre){
        super(name,age);
        this.socre = socre;
    }
    public int getScore(){
        return socre;
    }
   
}
class PrimaryStudent extends Student {
    // TODO
    protected int grade;
    public PrimaryStudent(String name ,int age,int socre,int grade){
        super(name,age,socre);
        this.grade = grade;

    }

    public int getGrade(){
        return grade;
    }
    public void setGrade(int grade){
        this.grade = grade;
}

}

